<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Visifire Basic Chart Sample</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="/site_media/chart/visifire/SLVisifireChartsWeb/Visifire2.js"></script>
</head>
    
<body style="text-align: center">
    
    <div id="VisifireChart0" >

        <script type="text/javascript" >
            // Create Visifire object
            var vChart = new Visifire2('/site_media/chart/visifire/SLVisifireChartsWeb/ClientBin/SL.Visifire.Charts.xap', "MyChart", {{ size.1 }}, {{ size.0 }});
            // Set Chart XML
            vChart.setDataUri("/chart/visifire/xml/{{ request_url }}");
            vChart.preLoad = function(args)
            {
                  /* First Chart Reference. If there are multiple charts in a XAML file,
                     array of chart references will be available as an event argument,
                     e.g. args[0], args[1], args[2] etc. */
                 var chart = args[0];
             
//                 chart.Series[0].MouseLeftButtonUp = OnDataPointMouseLeftButtonUp;
            }
            
            // Render chart
            vChart.render("VisifireChart0");
            
            function OnDataPointMouseLeftButtonUp(sender, eventArgs)
            {
                var str = "";
                str += "AxisXLabel = " + sender.AxisXLabel+ "\n";
                str += "XValue = " + sender.XValue+ "\n";
                str += "YValue = " + sender.YValue+ "\n";
                alert(str);
            }
            
        </script>
        
    </div>
    
</body>

</html>
